#pragma once
#include "xmlhandler.h"

class XmlResponseMessageHandler :
	public XmlHandler
{
	static const int MAX_CARD_IN_RESPONSE = 100;
public:
	char* subject;
private:
	CardInfo* lsCard;
	int cardCount;
public:
	XmlResponseMessageHandler(void);
	XmlResponseMessageHandler(char* xmlString);
	~XmlResponseMessageHandler(void);
	void setCards(CardInfo* cards, int size);
protected:
	void addAttributeType();
	void addBody();
private:
	Attribute parseAttribute(TiXmlElement* attNode);
	Metadata parseMetadata(TiXmlElement* metaNode);
	void addAttributeNode(TiXmlElement* cardNode, Attribute att);
	void addMetaDataNode(TiXmlElement* attNode, Metadata mt);
};
